package com.tz.farm_feeding.domain;

import java.text.SimpleDateFormat;
import java.util.Date;

import com.alibaba.fastjson.JSONObject;

public class Feed {
  private Integer id;

  private String idsn;

  private Integer remain;

  private Integer total;

  private Double cost;

  private Date createdate;

  @Override
  public String toString() {
    JSONObject jsonObject = new JSONObject();
    jsonObject.put("id", getId());
    jsonObject.put("idsn", getIdsn());
    jsonObject.put("remain", getRemain());
    jsonObject.put("total", getTotal());
    jsonObject.put("cost", getCost());
    SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    jsonObject.put("createdate", simpleDateFormat.format(getCreatedate()));
    return jsonObject.toJSONString();
  }

  public Integer getId() {
    return id;
  }

  public void setId(Integer id) {
    this.id = id;
  }

  public String getIdsn() {
    return idsn;
  }

  public void setIdsn(String idsn) {
    this.idsn = idsn == null ? null : idsn.trim();
  }

  public Integer getRemain() {
    return remain;
  }

  public void setRemain(Integer remain) {
    this.remain = remain;
  }

  public Integer getTotal() {
    return total;
  }

  public void setTotal(Integer total) {
    this.total = total;
  }

  public Double getCost() {
    return cost;
  }

  public void setCost(Double cost) {
    this.cost = cost;
  }

  public Date getCreatedate() {
    return createdate;
  }

  public void setCreatedate(Date createdate) {
    this.createdate = createdate;
  }
}